package com.fbinggun.fattribute.attribute.attack;

import com.fbinggun.fattribute.FAttributePlugin;
import com.fbinggun.fattribute.data.EntityData;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.potion.PotionEffectType;

public class PoisonAttack extends BuffAttack{
    @Override
    public double getDamage(EntityData data, EntityDamageByEntityEvent event){
        if(event.getCause()== EntityDamageEvent.DamageCause.POISON){
            System.out.println(getValue(data));
            return getValue(data);
        }
        return 0;
    }


    @Override
    public String getID() {
        return "PoisonAttack";
    }

    @Override
    public String getKey() {
        return FAttributePlugin.plugin.getConfigKey(getID());
    }

    @Override
    public int getCombat() {
        return 0;
    }



    @Override
    public PotionEffectType getPotionEffectType() {
        return PotionEffectType.POISON;
    }

}
